<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div th:fragment="header(name)">
        我是头部；欢迎：<span th:text="${name}"></span>
    </div>
</body>
</html>